package sctu.edu.java.year2016.team01.xuhanmei.day20160526.practice.zoo;

/**
 * Created by Administrator on 2016/5/26.。。
 */
public class Zoo1 {
    public static void main(String[] args) {


        Dog dogs = new Dog();
        System.out.println("调用dog.voice时输出的结果：");
        dogs.voice();

        Cat cats = new Cat();
        System.out.println("调用cats.voice时输出的结果：");
        cats.voice();

        Sheep sheep = new Sheep();
        System.out.println("调用sheep.voice时输出的结果");//结果是动物们发出叫声，证明在sheep类中没有对父类重写，就执行父类中
        sheep.voice();//的方法
    }
}
